package com.cloud.phone.task.bean;

import com.blankj.utilcode.util.GsonUtils;
import com.cloud.phone.tools.MyUtils;

public class ServerInnerDataBean {
    public String id;
    public String mainId;
    public String json;
    public int status;//服务端本次任务状态 2成功 3失败

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    /**
     * {"magic":null,"code":1003,"data":{"id":"663dec652b21d41635131065","mainId":"663deb2a2b21d41635131064","json":"{\"taskType\":10002,\"phoneId\":null,\"cpPhoneId\":4297481541262544897,\"account\":\"yin.d27\",\"mainId\":\"663deb2a2b21d41635131064\",\"waitTime\":8,\"waitTimeLike\":54,\"link\":\"https://vt.tiktok.com/ZSY1E6Y18/\"}"},"taskType":10002,"token":null,"type":null}
     * @return
     */

    public ServerTaskInnerBean getInnerBean() {
        if(MyUtils.isEmpty(json)){
            return null;
        }
        try {
            ServerTaskInnerBean serverTaskInnerBean = GsonUtils.fromJson(json, ServerTaskInnerBean.class);
            return serverTaskInnerBean;
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    public String getJson() {
        return json;
    }

    public void setJson(String json) {
        this.json = json;
    }

}
